package com.mc.cloud.mall.common.exception;

/**
 * @ClassName MallExceptionEnum
 * @Author MC
 * @Date 2021/5/20 12:52
 * @Version 1.0
 **/
public enum MallExceptionEnum {
    NEED_USER_NAME(10001,"用户名不能为空"),
    NEED_PASSWORD(10002,"密码不能为空"),
    PASSWORD_TOO_SHORT(10003,"密码不能小于8位"),
    NAME_EXISTED(10004,"名字重复"),
    INSERT_FAILED(10005,"插入失败"),
    PASSWORD_ERROR(10006,"密码错误"),
    UPDATE_FAILED(10007,"更新失败"),
    NEED_LOGIN(10008,"未登录，需要登录"),
    NEED_ADMIN(10009,"你没权限，登个嘚！！"),
    PARA_NOT_NULL(10010,"参数不能为空"),
    CREATE_FAILED(10011,"新增失败"),
    REQUEST_PARAM_ERROR(10012,"请求参数错误"),
    DELETE_FAILED(10013,"删除失败"),
    MKDIR_FAILED(10014,"文件夹创建失败"),
    UPLOAD_FAILED(10015,"图片上传失败"),
    PRODUCT_NOT_EXIST(10016,"商品不存在，删除失败"),
    NOT_SALE(10017,"商品不可出售"),
    NOT_ENOUGH(10018,"商品不足"),
    UPDATE_SELECTED_FAILED(10019,"更新商品选中状态失败"),
    CART_EMPTY(10020,"购物车已勾选商品为空"),
    NO_ENUM(10021,"没有对应枚举类"),
    NO_ORDER(10022,"没有此订单"),
    NOY_YOUR_ORDER(10023,"不是你的订单"),
    WRONG_PRDER_STATUS(10024,"订单状态不符"),
    SYSTEM_ERROR(20000,"系统错误，请重试");
    
    Integer code;
    
    String msg;
    
    MallExceptionEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    
    public Integer getCode() {
        return code;
    }
    
    public void setCode(Integer code) {
        this.code = code;
    }
    
    public String getMsg() {
        return msg;
    }
    
    public void setMsg(String msg) {
        this.msg = msg;
    }
}
